package com.ilink.ilinkcommon.config;
/**
 * <h3>ilink-java-backend</h3>
 *
 * @Description <p>编码过滤器处理URL中文问题</p>
 * @Author Black Curry
 * @Date 2024-09-24 10:47
 **/

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.filter.CharacterEncodingFilter;

/**
 * @ClassName EncodingFilterConfig
 * @Description TDwO
 * @Author Black Curry
 * @Date 2024-09-24 10:47
 **/

@Configuration
public class EncodingFilterConfig {

    @Bean
    public CharacterEncodingFilter characterEncodingFilter() {
        CharacterEncodingFilter filter = new CharacterEncodingFilter();
        filter.setEncoding("UTF-8");
        filter.setForceEncoding(true);
        return filter;
    }
}
